#ifndef WRAP_UIO_H
#define WRAP_UIO_H

#include <cstdio>

struct iovec;

namespace Wrap {

/// @see https://man7.org/linux/man-pages/man2/readv.2.html
/// @param iovcnt The readv() system call reads @c iovcnt buffers
/// @param fd from the file associated with the file descriptor @c fd
/// @param iov into the buffers described by @c iov ("scatter input").
/// @return On success, readv() return the number of bytes read. Note that it
/// is not an error for a successful call to transfer fewer bytes than
/// requested (see read(2) and write(2)). On error, -1 is returned, and errno
/// is set to indicate the error.
/// @throw The errors are as given for read(2).
/// @throw EINVAL The vector count, iovcnt, is less than zero or greater than
/// the permitted maximum.
ssize_t readv_(int fd, struct iovec *iov, int iovcnt);
}


#endif